#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time: 2022/12/22 10:53
# @Author: scg
# @Email: xxx@gmail.com
# @File：clue_show_page.py

from selenium.webdriver.common.by import By
from pages.base_page import BasePage


class ClueShowPage(BasePage):
    url = '/crm/index.php?m=leads'

    add_clue_btn_locator = (By.CSS_SELECTOR, "body > div.container > div.row > div:nth-child(1) > div > a")
    save_success_locator = (By.CSS_SELECTOR, 'body > div.container > div.alert.alert-success')

    def click_add_clue_btn(self):
        self.driver.find_element(*self.add_clue_btn_locator).click()

    def get_save_success_text(self):
        return self.driver.find_element(*self.save_success_locator).text
